﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Customer.Domain.Dto
{
    public class SalesAddDTO
    {
        /// <summary>
        /// 销售信息管理表id
        /// </summary>
        [Key]
        public int SalesId { get; set; }

        /// <summary>
        /// 销售单号
        /// </summary>
        public string? SalesCode { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>
        public int? DocumentType { get; set; }

        /// <summary>
        /// 关联订单号
        /// </summary>
        public string? MorderNumber { get; set; }

        /// <summary>
        /// 客户编号（外建）
        /// </summary>
        public string? ClientCode { get; set; }

        /// <summary>
        /// 客户名称（外建）
        /// </summary>
        public string? ClientName { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        public string? SalesName { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        public string? SalesPhone { get; set; }

        /// <summary>
        /// 发货日期
        /// </summary>
        public DateTime? ShipmentsTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Sremark { get; set; }

        /// <summary>
        /// 制单人
        /// </summary>
        public string? MakePerson { get; set; }

        /// <summary>
        /// 制单时间
        /// </summary>
        public DateTime? SalesTime { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int? SalesState { get; set; }

        /// <summary>
        /// 是否入账
        /// </summary>
        public int? IsRecorded { get; set; }

        /// <summary>
        /// 出库数
        /// </summary>
        public int? OutShipment { get; set; }

        /// <summary>
        /// 公司id
        /// </summary>
        public string? Office_Id { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public int? User_Id { get; set; }


        public List<AddSales> addSales { get; set; }

    }


    public class AddSales
    {
        /// <summary>
        /// 销售产品关联表id
        /// </summary>
        public int SellProductId { get; set; }

        /// <summary>
        /// 销售id
        /// </summary>
        public string? SalesCode { get; set; }

        /// <summary>
        /// 产品id
        /// </summary>
        public int? ProductsId { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int? SellProductNum { get; set; }

        /// <summary>
        /// 公司id
        /// </summary>
        public string? Office_Id { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public int? User_Id { get; set; }
    }

}
